package com.defangit.production.bll;

import com.defangit.production.domain.ProductionBill;
import laogen.util.entities.Finder;
import java.time.LocalDateTime;

/**
 * Created by zhangfagen on 2018/6/6.
 */
public interface ProductionBillBll extends CommonBusinessLogic<ProductionBill>  {
    ProductionBill addProductionBill(ProductionBill bill);
    ProductionBill updateProductionBill(ProductionBill bill,Integer operator);
    boolean deleteProductionBill(int id);
    ProductionBill updateStartTime(Integer operatorId,Integer billId);
    ProductionBill updateEndTime(Integer operatorId,Integer billId);
    ProductionBill updateBillAddLiable(Integer bill,Integer leaderId);
    /**
     * 修改工序单的期望完成时间
     * @param billId 生产订单id
     * @param exportTime 要添加的工序派工单
     * @param liableId 负责人id
     * @return 添加后的工序派工单
     */
    ProductionBill updateExpectTime(LocalDateTime exportTime,Integer billId,Integer liableId);
    ProductionBillFinder findAll();
    interface ProductionBillFinder extends Finder<ProductionBill>{
        ProductionBillFinder authorId(Integer id);
        ProductionBillFinder liableId(Integer id);
        ProductionBillFinder processLiable(Integer id);
        ProductionBillFinder liableIsNotNull();
        ProductionBillFinder startTimeIsNotNull();
        ProductionBillFinder endTimeIsNotNull();
    }
}
